cmake_minimum_required(VERSION 3.5.1)
project(book-manager) # 图书管理系统

set(CMAKE_C_STANDARD 11)

if(LINUX)
	message("PLATFORM: LINUX")
	add_compile_options(-Wall)
	if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
		add_compile_options(-g)
		message("Build Type: ${CMAKE_BUILD_TYPE}")
	endif ()
	add_definitions(-DLINUX)
endif()


set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

file(GLOB_RECURSE SRC ${PROJECT_SOURCE_DIR}/src/*.c)
include_directories(${PROJECT_SOURCE_DIR}/src)

add_executable(book-manger
	main.c
	${SRC}
)
